package com.freight.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.freight.core.base.FreightBaseEntity;
import com.freight.core.common.constant.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.ColumnTransformer;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author huyingtai
 */
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "user_company_license")
@TableName("user_company_license")
@ApiModel(value = "营业资格证")
public class CompanyLicense extends FreightBaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司名称")
    private String companyName;

    @ApiModelProperty(value = "公司注册手机号")
    @ColumnTransformer(read = "AES_DECRYPT(UNHEX(company_phone),'freight')", write = "HEX(AES_ENCRYPT(?, 'freight'))")
    private String companyPhone;

    @ApiModelProperty(value = "公司代表人")
    private String companyUserName;

    @ApiModelProperty(value = "公司代表人手机号码")
    @ColumnTransformer(read = "AES_DECRYPT(UNHEX(company_user_phone),'freight')", write = "HEX(AES_ENCRYPT(?, 'freight'))")
    private String companyUserPhone;

    @ApiModelProperty(value = "统一信用社会代码")
    private String certNo;

    @ApiModelProperty(value = "开户银行")
    private String bankName;

    @ApiModelProperty(value = "银行卡号")
    private String bankCode;

    @ApiModelProperty(value = "街道")
    private String street;

    @ApiModelProperty(value = "公司类型")
    private String type;

    @ApiModelProperty(value = "注册金额")
    private String capital;

    @ApiModelProperty(value = "注册日期")
    private String startDate;

    @ApiModelProperty(value = "有效日期")
    private String endDate;

    @ApiModelProperty(value = "公司营业执照图片地址")
    private String companyLicenseFileId;



}